Skip to content

Conversation

@tangrufus
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 7, 2025 22:31
@tangrufus tangrufus enabled auto-merge (squash) December 7, 2025 22:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to use YAML anchors (&matrix) and aliases (*matrix) to eliminate duplication of the matrix strategy configuration between the build and e2e jobs. However, GitHub Actions workflows do not support YAML anchors and aliases, making this change non-functional.

Key Changes

  • Added a YAML anchor &matrix to the matrix strategy in the build job
  • Replaced the duplicated matrix definition in the e2e job with a YAML alias *matrix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

needs: phar
strategy:
matrix:
matrix: &matrix
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub Actions does not support YAML anchors and aliases. While the YAML syntax &matrix is valid YAML, GitHub Actions workflow parser will not process this anchor, and the subsequent alias reference *matrix on line 160 will fail. This will cause the workflow to fail when it runs.

To avoid duplication, consider one of these alternatives:

  1. Use a reusable workflow to share common matrix configurations
  2. Keep the matrix definition duplicated in both jobs (current working approach)
  3. Use a composite action if the entire job logic can be shared

Copilot uses AI. Check for mistakes.
variant: darwin_arm64
- runs-on: macos-15-intel
variant: darwin_amd64
matrix: *matrix
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This YAML alias reference *matrix will not work in GitHub Actions workflows. GitHub Actions does not support YAML anchors and aliases, so this reference to the anchor defined on line 90 will fail, causing the workflow to error.

The matrix configuration needs to be explicitly defined here, as it was before this change.

Suggested change
matrix: *matrix
matrix:
include:
- runs-on: ubuntu-24.04-arm
variant: linux_arm64
spc-variant: linux-aarch64
- runs-on: ubuntu-24.04
variant: linux_amd64
spc-variant: linux-x86_64
- runs-on: macos-15
variant: darwin_arm64
spc-variant: macos-aarch64
- runs-on: macos-15-intel
variant: darwin_amd64
spc-variant: macos-x86_64

Copilot uses AI. Check for mistakes.
@tangrufus tangrufus merged commit 0e8f35c into main Dec 7, 2025
44 of 50 checks passed
@tangrufus tangrufus deleted the tangrufus-patch-1 branch December 7, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants